const connection = require("./db.config");

const configSql = (params) => {
  return new Promise((resolve, reject) => {
    connection.query(params, (error, results, fields) => {
      if (error) {
        reject(error);
      } else {
        resolve(results);
      }
    });
  });
};
module.exports = configSql;
